package routes

import (
	"github.com/kataras/iris/mvc"
	"bootstrap"
	logic "src/logic"
	adminC "app/admin/controller"
	indexC "app/index/controller"
	"src/middle"
)

// Configure registers the necessary routes to the app.
func Configure(b *bootstrap.Bootstrapper) {
	superstarService := logic.NewSuperstarService()

	index := mvc.New(b.Party("/"))
	index.Register(superstarService)
	index.Handle(new(indexC.IndexController))

	admin := mvc.New(b.Party("/admin"))
	admin.Router.Use(middle.BasicAuth)
	admin.Register(superstarService)
	admin.Handle(new(adminC.AdminController))

	//b.Get("/follower/{id:long}", GetFollowerHandler)
	//b.Get("/following/{id:long}", GetFollowingHandler)
	//b.Get("/like/{id:long}", GetLikeHandler)
}